import {Base} from '../../utils/base.js';
class Home extends Base{
  constructor(){
    super();
  }

  /**
   * 获取banner图片信息
   */
  getBannerData(callBack){
    var params = {
      url:'banner/1',
      sCallBack:function(data){
        callBack && callBack(data.items);
      }
    };
    this.request(params);
  }

  /**
   * 首页主题
   */
  getThemeData(callBack){
    var params = {
      url:'theme?ids=1,2,3',
      sCallBack:function(data){
        callBack && callBack(data);
      }
    };
    this.request(params);
  }

  /**
   * 最近新品
   */
  getProductsData(callBack){
    var params = {
      url:'product/recent',
      sCallBack:function(data){
        callBack && callBack(data);
      }
    };
    this.request(params);
  }
}

export {Home};